package com.hyh.admin.domain.resources;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.hyh.ad.common.core.domain.BaseEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

@Data
@ApiModel(value = "Resources对象", description = "资源实体类")
public class Resources extends BaseEntity implements Serializable {
    /**
     * 资源id
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "资源id")
    @JsonSerialize(using = ToStringSerializer.class) // 防止前端精度丢失
    private Long id;

    /**
     * 父类id
     */
    @ApiModelProperty(value = "父类id")
    @JsonSerialize(using = ToStringSerializer.class) // 防止前端精度丢失
    private Long parentId;

    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    @JsonSerialize(using = ToStringSerializer.class) // 防止前端精度丢失

    private Long userId;

    /**
     * 资源标题
     */
    @ApiModelProperty(value = "资源标题")
    private String title;

    /**
     * 资源描述
     */
    @ApiModelProperty(value = "资源描述")
    private String description;

    /**
     * 资源路径
     */
    @ApiModelProperty(value = "资源路径")
    private String url;

    /**
     * 资源时长
     */
    @ApiModelProperty(value = "资源时长")
    private String duration;

    /**
     * 资源分类id
     */
    @ApiModelProperty(value = "资源分类id")
    @JsonSerialize(using = ToStringSerializer.class) // 防止前端精度丢失

    private Long categoryId;

    /**
     * 资源热度
     */
    @ApiModelProperty(value = "资源热度")
    private String hotDegree;

    /**
     * 资源类型
     */
    @ApiModelProperty(value = "资源类型")
    private String category;

    /**
     * 收藏量
     */
    @ApiModelProperty(value = "收藏量")
    private String collectCount;

    /**
     * 下载量
     */
    @ApiModelProperty(value = "下载量")
    private String downloadCount;

    /**
     * 点赞量
     */
    @ApiModelProperty(value = "点赞量")
    private String loveCount;

    /**
     * 分享量
     */
    @ApiModelProperty(value = "分享量")
    private String shareCount;

    /**
     * 标签属性
     */
    @ApiModelProperty(value = "标签属性")
    private String tags;

    /**
     * 资源第几集
     */
    @ApiModelProperty(value = "资源第几集")
    private String episodeNumber;

    /**
     * 资源状态
     */
    @ApiModelProperty(value = "资源状态")
    private String status;

    /**
     * 是否推荐资源
     */
    @ApiModelProperty(value = "是否推荐资源")
    private Boolean isFeatured;

    /**
     * 资源评分
     */
    @ApiModelProperty(value = "资源评分")
    private String rating;

    /**
     * 评论数
     */
    @ApiModelProperty(value = "评论数")
    private Integer reviewCount;

    /**
     * 资源来源
     */
    @ApiModelProperty(value = "资源来源")
    private String source;

    /**
     * 封面图片url
     */
    @ApiModelProperty(value = "封面图片url")
    private String coverImage;

    /**
     * 资源文件大小
     */
    @ApiModelProperty(value = "资源文件大小")
    private String fileSize;

    /**
     * 资源格式
     */
    @ApiModelProperty(value = "资源格式")
    private String format;
}
